package day09;

public class TestToString {
	public static void main(String[] args) {
		Student s = new Student("guodh",20);
		Student s1 = new Student("SongJie", 18);
		Student s2 = s;
/*		String ss = s.toString();
		System.out.println(ss);*/
		System.out.println("s:"+s/*.toString()*/);
		System.out.println("s1:"+s1);
		System.out.println("s2:"+s2);
		String str = "Hello "+s/*.toString()*/;
		System.out.println(str);
	}
}

class Student{
	private String name;
	private int age;
	public Student(String string, int i) {
		name = string;
		age = i;
	}
	/*public String toString(){
		return name+":"+age;
	}*/
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	
}
